.work-view-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;

  .work-view-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;

    .loading-text {
      margin-top: 16px;
      color: #666;
      font-size: 16px;
    }
  }

  .work-view-error {
    text-align: center;
    padding: 60px 20px;
  }

  .work-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;

    .back-button {
      font-size: 16px;
      height: 40px;
      padding: 0 20px;
      border-radius: 8px;
    }

    .work-actions {
      .ant-btn {
        height: 40px;
        border-radius: 8px;
        font-weight: 500;
      }
    }
  }

  .work-content-card {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;

    .work-title-section {
      margin-bottom: 24px;

      .work-title {
        color: #1890ff;
        margin-bottom: 16px;
        font-weight: 700;
        line-height: 1.3;
        text-align: center;
      }

      .work-meta {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
        padding: 16px;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e8e8e8;

        .ant-space-item {
          display: flex;
          align-items: center;
        }
      }
    }

    .work-cover {
      text-align: center;
      margin: 24px 0;

      .cover-image {
        max-width: 100%;
        max-height: 400px;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        object-fit: cover;
      }
    }

    .work-content {
      .content-html {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
        line-height: 1.8;
        color: #333;
        font-size: 16px;

        h1, h2, h3, h4, h5, h6 {
          color: #1890ff;
          margin-top: 32px;
          margin-bottom: 16px;
          font-weight: 600;
          line-height: 1.4;
        }

        h1 {
          font-size: 28px;
          border-bottom: 2px solid #e8e8e8;
          padding-bottom: 12px;
        }

        h2 {
          font-size: 24px;
          border-bottom: 1px solid #f0f0f0;
          padding-bottom: 8px;
        }

        h3 { font-size: 20px; }
        h4 { font-size: 18px; }
        h5 { font-size: 16px; }
        h6 { font-size: 14px; }

        p {
          margin-bottom: 16px;
          text-align: justify;
          text-justify: inter-ideograph;
        }

        img {
          max-width: 100%;
          height: auto;
          border-radius: 8px;
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
          margin: 16px 0;
        }

        blockquote {
          border-left: 4px solid #1890ff;
          background: #f0f8ff;
          padding: 16px 20px;
          margin: 16px 0;
          border-radius: 0 8px 8px 0;
          font-style: italic;
        }

        code {
          background: #f6f8fa;
          padding: 2px 6px;
          border-radius: 4px;
          font-family: 'Courier New', Monaco, monospace;
          font-size: 14px;
          color: #d73a49;
        }

        pre {
          background: #f6f8fa;
          padding: 16px;
          border-radius: 8px;
          overflow-x: auto;
          border: 1px solid #e1e4e8;
          margin: 16px 0;

          code {
            background: none;
            padding: 0;
            color: #333;
          }
        }

        ul, ol {
          margin: 16px 0;
          padding-left: 32px;

          li {
            margin-bottom: 8px;
            line-height: 1.6;
          }
        }

        table {
          width: 100%;
          border-collapse: collapse;
          margin: 16px 0;
          border: 1px solid #e8e8e8;
          border-radius: 8px;
          overflow: hidden;

          th, td {
            padding: 12px 16px;
            text-align: left;
            border-bottom: 1px solid #e8e8e8;
          }

          th {
            background: #f8f9fa;
            font-weight: 600;
            color: #333;
          }

          tr:hover {
            background: #f8f9fa;
          }
        }

        a {
          color: #1890ff;
          text-decoration: none;

          &:hover {
            text-decoration: underline;
          }
        }

        strong {
          font-weight: 600;
          color: #333;
        }

        em {
          font-style: italic;
          color: #666;
        }
      }
    }

    .work-attachments {
      margin-top: 24px;

      h4 {
        color: #1890ff;
        margin-bottom: 16px;
      }

      .attachment-card {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        transition: all 0.3s ease;

        &:hover {
          box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
          transform: translateY(-2px);
        }

        .attachment-title {
          font-weight: 500;
          color: #333;
          word-break: break-word;
          font-size: 14px;
        }

        .attachment-description {
          font-size: 12px;
          color: #666;
          line-height: 1.4;

          div {
            margin-bottom: 2px;
          }
        }

        .ant-card-actions {
          .ant-btn-link {
            font-size: 12px;
            height: auto;
            padding: 4px 8px;
          }
        }
      }
    }
  }
}

// 文档预览模态框样式
.document-preview-modal {
  .document-preview-content {
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e8e8;

    // 继承作品内容的样式
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
    line-height: 1.8;
    color: #333;
    font-size: 16px;

    h1, h2, h3, h4, h5, h6 {
      color: #1890ff;
      margin-top: 24px;
      margin-bottom: 12px;
      font-weight: 600;
    }

    p {
      margin-bottom: 12px;
      text-align: justify;
    }

    img {
      max-width: 100%;
      height: auto;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    table {
      width: 100%;
      border-collapse: collapse;
      margin: 16px 0;
      border: 1px solid #e8e8e8;

      th, td {
        padding: 8px 12px;
        border: 1px solid #e8e8e8;
        text-align: left;
      }

      th {
        background: #f8f9fa;
        font-weight: 600;
      }
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .work-view-container {
    padding: 16px;

    .work-view-header {
      flex-direction: column;
      gap: 16px;
      align-items: stretch;

      .work-actions {
        display: flex;
        justify-content: center;
      }
    }

    .work-content-card {
      .work-title-section {
        .work-meta {
          flex-direction: column;
          align-items: center;
          gap: 12px;
        }
      }

      .work-content .content-html {
        font-size: 15px;

        h1 { font-size: 24px; }
        h2 { font-size: 20px; }
        h3 { font-size: 18px; }
        h4 { font-size: 16px; }
      }
    }
  }
}

// 暗色主题支持
@media (prefers-color-scheme: dark) {
  .work-view-container {
    .work-content-card {
      background: #1f1f1f;
      border-color: #434343;

      .work-title-section .work-meta {
        background: #2a2a2a;
        border-color: #434343;
      }

      .work-content .content-html {
        color: #e6e6e6;

        h1, h2, h3, h4, h5, h6 {
          color: #4dabf7;
        }

        blockquote {
          background: #1a2332;
          border-left-color: #4dabf7;
        }

        code {
          background: #2a2a2a;
          color: #ff6b6b;
        }

        pre {
          background: #2a2a2a;
          border-color: #434343;

          code {
            color: #e6e6e6;
          }
        }

        table {
          border-color: #434343;

          th, td {
            border-color: #434343;
          }

          th {
            background: #2a2a2a;
            color: #e6e6e6;
          }

          tr:hover {
            background: #2a2a2a;
          }
        }
      }
    }

    .attachment-card {
      background: #2a2a2a;
      border-color: #434343;

      .attachment-title {
        color: #e6e6e6;
      }
    }
  }

  .document-preview-modal .document-preview-content {
    background: #1f1f1f;
    border-color: #434343;
    color: #e6e6e6;

    h1, h2, h3, h4, h5, h6 {
      color: #4dabf7;
    }

    table {
      border-color: #434343;

      th, td {
        border-color: #434343;
      }

      th {
        background: #2a2a2a;
        color: #e6e6e6;
      }
    }
  }
}